package com.ctcc.entity;

import java.io.Serializable;

public class TeamAccessToken implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 363872451913215924L;
	private String accessToken;

	private int expireIn;

	private String refreshToken;

	private long createTime;

	public TeamAccessToken() {
		super();
		this.createTime = System.currentTimeMillis();
	}

	public boolean isExpire() {
		return this.createTime + this.expireIn * 1000 < System.currentTimeMillis() - 1000 * 60 * 5;
	}

	public String getAccessToken() {
		return accessToken;
	}

	public void setAccessToken(String accessToken) {
		this.accessToken = accessToken;
	}

	public int getExpireIn() {
		return expireIn;
	}

	public void setExpireIn(int expireIn) {
		this.expireIn = expireIn;
	}

	public String getRefreshToken() {
		return refreshToken;
	}

	public void setRefreshToken(String refreshToken) {
		this.refreshToken = refreshToken;
	}

	public long getCreateTime() {
		return createTime;
	}

	public void setCreateTime(long createTime) {
		this.createTime = createTime;
	}
}
